/**
 * 
 */
package image.bmp;

import image.Image;

/**
 * @author nquangtrung
 *
 */
public class BinaryImage implements Image {
	
	private int[][] bin;
	
	private int width, height;
	
	public BinaryImage(int[][] bin, int width, int height) {
		this.setBin(bin);
		this.setWidth(width);
		this.setHeight(height);
	}

	@Override
	public int getRGB(int x, int y) {
		return 0;
	}

	@Override
	public int getRed(int x, int y) {
		return (bin[x][y] > 0?255:0);
	}

	@Override
	public int getBlue(int x, int y) {
		return (bin[x][y] > 0?255:0);
	}

	@Override
	public int getGreen(int x, int y) {
		return (bin[x][y] > 0?255:0);
	}

	@Override
	public int getWidth() {
		return width;
	}

	@Override
	public int getHeight() {
		return height;
	}

	/**
	 * @return the bin
	 */
	public int[][] getBin() {
		return bin;
	}

	/**
	 * @param bin the bin to set
	 */
	public void setBin(int[][] bin) {
		this.bin = bin;
	}

	/**
	 * @param width the width to set
	 */
	public void setWidth(int width) {
		this.width = width;
	}

	/**
	 * @param height the height to set
	 */
	public void setHeight(int height) {
		this.height = height;
	}

}
